#pragma once
#include "collision\CollisionDetector.h"
#include "nodes\DynamicSpriteNode.h"
#include "cvar\CVar.h"
#include "game\World.h"
#include <vector>

// -----------------------------------------------------------------------------
//
// -----------------------------------------------------------------------------
class Ship : public ds::DynamicSpriteNode {

public:
	Ship();
	~Ship(void);
	void loadContent(ds::ResManager& resourceManager);
	ds::Vec2 getPosition() const {
		return m_Position;
	}
	float getBulletAngle() const {
		return m_BulletAngle;
	}
	void update(float elapsed);
	void setMagnetic(bool m) {
		m_Magnetic = m;
	}
	void setBlocked(bool blocked);
private:
	//
	void updatePosition(const ds::Vec2& pos);
	ds::Vec2 m_Position;
	ds::Sprite* m_Hero;
	ds::Sprite* m_Circle;
	ds::CDHandle m_LeftHandle;
	ds::CDHandle m_RightHandle;
	float m_BulletAngle;
	float m_Rotation;
	bool m_Magnetic;
	bool m_Blocked;
};

